The present invention relates to a new method of pre-compensating for ink spread (often called xe2x80x9cprint gainxe2x80x9d or xe2x80x9cdot gainxe2x80x9d) before printing a bar code or binary code.
There are two encodation schemes commonly used in modern bar code symbology design, xe2x80x9cBinaryxe2x80x9d encoding and (xe2x80x9cn,k)xe2x80x9d encoding. Each have their advantages and disadvantages; generally speaking, (n,k) encoding is more space-efficient, but Binary encoding is more tolerant of poor printing. Thus, both types will continue to be widely used for the foreseeable future. xe2x80x9cBinaryxe2x80x9d codes (such as Code 39) define the set of bar/space patterns making up its xe2x80x9clanguagexe2x80x9d or bar code character set using only two choices (xe2x80x9cwidexe2x80x9d or xe2x80x9cnarrowxe2x80x9d) for each bar and space of each pattern. The wide:narrow ratio can be selected when printing each bar code. Selecting a 2:1 ratio creates a more compact bar code; a 2.5:1 or 3:1 ratio makes the bar code wider, but also makes it easier for the scanner to distinguish wide elements from narrow ones (helpful when printing on rough cardboard, for example). xe2x80x9cDelta Distancexe2x80x9d codes (Such as UPC-A and Code 128) use an encodation scheme known as (n,k) encoding, to define the set of bar/space patterns making up its xe2x80x9clanguagexe2x80x9d or bar code character set. In an (n,k) code, each bar code character is comprised of xe2x80x9ckxe2x80x9d bars and xe2x80x9ckxe2x80x9d spaces (eg, 3 bars and 3 interleaved spaces), and each individual bar and space is an integer multiple (1,2, . . . m) of a unit width (called a xe2x80x9cmodulexe2x80x9d). Unlike the case for Binary codes, these ratios cannot be altered to accommodate difficult printing situations.
One characteristic that the Binary and (n,k) encodation schemes share is that they both define a unit width (called a module), and in either scheme, the narrowest bars and the narrowest spaces are both one module wide. Ideally, every printed barcode would be printed exactly to specification, in order to allow a maximum tolerance for noise and other distortions during the scanning process. In practice, however, the printing process can introduce a variety of imperfections, many of these resulting from imperfections in the paper (or other substrate) that the bar code is printed upon. These substrate imperfections may introduce random errors in the positions of the edges that separate dark bars from light spaces within the bar code.
One substrate-induced error stems from the fact that different substrates vary (and even different pages of the same substrate vary) in how they absorb ink at the time of printing. The result is that, on a given sample of a substrate, the dark areas (bars) of a bar code may be significantly wider than the spaces that were nominally of the same width. Yet, on a different sample, the same bar code digital image may result in a printed symbol where the bars are narrower than nominal, rather than wider. It is usually the case, however, that on a given printed sample, all of the printed dots tend to show the same amount of xe2x80x9cdot gainxe2x80x9d (or loss). Therefore, all of the bar code""s bars tend to be either bigger than nominal (and by the same amount), or all are smaller (and by the same amount). Thus, from the perspective of reading a bar code, this dot-gain phenomenon is considered a systematic (not random) error, and is known as xe2x80x9cuniform ink spread.xe2x80x9d
Uniform ink spread is such a common printing problem that current symbology designs almost always rely on a technique called xe2x80x9cedge to similar edge decodingxe2x80x9d (also called xe2x80x9cdelta distance decodingxe2x80x9d) to handle it. Ink spreads uniformly outwardly from the center of each printed dot, and therefore the left and right edges of every printed bar will move outwardly (from the bar""s center) by equal amounts. Thus, a measurement taken from the left edge of one bar, across the bar and the next space, to the left edge of the next bar, will not vary with the degree of ink spread. Some bar code symbologies, such as Code 128, were designed to be decoded based on such xe2x80x9cedge to similar edgexe2x80x9d measurements and thus are relatively immnune to uniform ink spread.
Unlike codes such as Code 128, binary codes are typically not decoded using xe2x80x9cdelta distance decodingxe2x80x9d techniques and thus do not have the same inherent immunity to ink spread. However, various techniques for decoding binary codes (by estimating a xe2x80x9cthresholdxe2x80x9d width, ideally halfway between the nominal wide and nominal narrow widths) are well known in the art, and can provide good immunity to ink spread and other printing errors.
Although xe2x80x9cdelta distance decodingxe2x80x9d and other decoding techniques known in the art address some problems caused by ink spread, there is a remaining problem with ink spread that is not solved by these techniques. This problem is that when narrow (1-module) spaces shrink due to ink spread, they can become so narrow that they may not be seen at all by the scanner (or at the least, will reduce the effective working range of the scanner). So, even with xe2x80x9cdelta distancexe2x80x9d codes, some form of ink spread control is required. This is done by adjusting the ideal representation of the bar code before printing it, a process often known as xe2x80x9cpre-compensationxe2x80x9d of the image.
Traditional ink-spread pre-compensation methods involve reducing the width of each printed bar with an exactly corresponding increase in the width of each space (or the oppositexe2x80x94increasing the bar width and decreasing the spacexe2x80x94in those rare cases where the expectation is for a consistently under-inked printing process). For example, one might adjust the ideal bar code image by replacing the last column of black pixels of every bar with a column of white pixels (i.e., xe2x80x9cshavingxe2x80x9d one dot from the right edge of every bar). The advantage of this traditional approach is that the decoding technique, as described above, gives an identical edge-to-similar-edge measurement, whether compensation was applied or not. The major disadvantage is that, by definition, the bar code image contains bars that are less than 1 module wide. This creates two significant problems.
First, if, in a given instance of printing, the ink does not spread, the printed code will have bars that are smaller than nominal. This condition can degrade scannability. Similarly, if the ink-spread phenomenon is not consistent from one printed sample to another, then the traditional pre-compensation method will sometimes improve system performance, and sometimes degrade it.
Second, the compensated image now contains xe2x80x9cfinerxe2x80x9d lines than before. It is common for the same page-layout file to be used for printing on presses with different physical resolutions (i.e., the physical distance between dots of the printer vary significantly across printing processes). The last step in the publishing chain, called Raster Image Processing, maps the image to the addressable dots of the printer. This stage, and previous stages, can introduce rounding or scaling errors in the widths of the bars and spaces. The thinner the bars, the more likely that the process will create an occasional bar that is much too wide or narrow, resulting in an unreadable barcode.
Thus, in order to avoid both of these problems, the ideal pre-compensation method would not decrease the size of any bars or spaces of the bar code.
The use of bar codes in printed advertisements and newspaper text is expected to increase significantly in the near future, as the cost of Internet-enabled scanning devices becomes low enough for the consumer mass market. Currently, several methods have been proposed for using a printed bar code for automatically connecting to an appropriate site on the World Wide Web. As a result of this and other applications, it will become increasingly common to print the same bar code image, and the same advertisement containing a bar code image, in a variety of print media including magazines, newspapers, catalogs, and telephone directories (white pages and yellow pages). Each of these print media typically has its own combination of printing press technology. (such as gravure, offset, and flexography) and paper (ranging from high-weight glossy paper in magazines, to recycled newsprint and the very low-weight paper used in a telephone book), each variation of which may have different ink spread characteristics. Therefore, as consumer scanning applications proliferate, it will no longer be feasible to generate a single bar code image, or a single ad containing a bar code, that will be appropriately pre-compensated for all of the substrates it will be printed on, using traditional pre-compensation techniques.
A main object of the present invention is to provide a method for print gain compensation that does not reduce the widths of any elements of a bar code or binary code.
Another object of the present invention is to provide a bar code symbology, where the ideal image of the bar code does not require further compensation for ink spread or reduction, and therefore is more suitable than current symbologies for printing in a wide variety of press processes, to a wide variety of paper and other substrates.
A further object of the present invention is to provide a method for print gain compensation by designing a symbology that does not contain any spaces as small as the nominal narrowest bar width, so as to minimize the negative effects of ink spread.
Yet another object of the present invention is to provide a bar code symbology, where the reading system can automatically discriminate between the standard version of the symbology, and one or more versions that have been pre-compensated for print gain using the techniques of the present invention.
Yet a further object of the present invention is to provide a method for decoding a pre-compensated symbology.
These and other objects and advantages of the present invention are achieved in accordance with the present invention in which pre-compensation is applied to an existing optical code encodation scheme wherein the digital image of the code increases the width of the spaces, but does not reduce or increase the widths of the bars. In particular, and in accordance with one embodiment of the method of the present invention, the pattern of printed areas and spaces for a given data input is determined and a given length is added to the length of each space while the length of the printed areas remains unchanged to enlarge the overall length of the resulting code symbol in the at least one dimension.
The resulting bar code image will result in a robust printed symbol, even if the final printing stage introduces no dot gain, or even exhibits dot loss rather than dot gain. The method according to the present invention, while particularly suitable for bar codes and in particular for n,k bar codes, can be used with other types of optical codes, such as binary codes, that suffer from ink spread problems.
The existing optical code symbology is preferably a bar code having bars and spaces of varying widths and wherein the added given length is a function of the width of the narrowest space. Preferably, the bar code is an n,k bar code and wherein the added length is a function of a module width of the resulting bar code symbol. In a preferred embodiment, the added length is x modules where 0 less than xxe2x89xa62 and most preferably the added length is 0.5 or 1 module.
In a particularly commercially advantageous embodiment of the present invention, wherein the n,k bar code is an 11,3 bar code wherein the bars and spaces are from 1 to 4 modules in length. A bar code of this type is described in U.S. patent application Ser. No. 60/237,639, the entire contents of which are hereby incorporated by reference.
In another embodiment of the invention, the code symbology is a two-dimensional code symbology and preferably it is a bar code and most preferably an n,k bar code, such as PDF417. In a further embodiment of the invention, auto-discrimination is added to the resulting code symbol to enable a reader to determine that the code symbol is an ink-spread compensated variant for the decoding thereof. In one embodiment, the auto-discrimination is added by using different data characters than in the existing symbology. Alternatively, auto-discrimination comprises using a different subset of codewords than in the existing symbology. In another variation, auto-discrimination is added by using a unique data character pattern to identify the code symbol as an ink-spread compensated variant. Further, auto-discrimination can be added by providing a unique start pattern in the resulting code symbol, a unique stop pattern in the resulting code symbol or both. The auto-discrimination can also be added by providing a unique finder pattern in the resulting code symbol.
A method in accordance with the invention of decoding an ink-spread compensated variant of an existing n,k bar code symbology produced in accordance with the invention comprises discriminating that the bar code symbol is an ink-spread compensated variant and what the amount of the added length, normalizing the width of a character to add the total added length and varying the threshold for the spaces to include the length added thereto.
An ink-spread compensated n,k bar code symbology in accordance with the invention comprises characters having k bars and k spaces of varying width, wherein the width of each bar is from 1 to m modules in length and wherein the width of each space is from 1+x to m+x modules in length, wherein 0 less than xxe2x89xa62 modules in length, and wherein the overall length of each character is n+kx modules. Preferably, the n,k bar code is an 11,3 bar code wherein the bars and spaces are from 1 to 4 modules in length and most preferably x is 0.5 module or 1 module.